package com.jhh.pay.heli.controller;

import com.alibaba.fastjson.JSONObject;
import com.jhh.pay.channel.pojo.RequestBean;
import com.jhh.pay.heli.bean.withhold.SingleWithholdResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by zhangqi on 2017/12/7.
 */
@Controller
@RequestMapping("callback")
@EnableConfigurationProperties
public class TestController {

    private static final Logger mLogger = LoggerFactory.getLogger(TestController.class);

    @ResponseBody
    @PostMapping("/withhold")
    public String Test(SingleWithholdResult singleWithholdResult){
        RequestBean requestBean = new RequestBean();
        requestBean.setMoney(123213123f);
        mLogger.info(JSONObject.toJSONString(singleWithholdResult));
        return ""+requestBean.getMoney();
    }

}
